/*
 * Copyright 2017 The Kubernetes Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import 'SidecarCommon.css';
@import '../../scss/components/Sidecar/_mixins';
@import '../../scss/components/Terminal/_mixins';

$focus-color: var(--color-brand-03);

.kui--sidecar.visible.kui--nav-view {
  .kui--sidecar-content {
    width: 70%;
  }

  .sidecar-bottom-stripe-left-bits {
    display: none;
  }

  .kui--sidecar-header-and-body {
    font-size: inherit;
  }

  .sidecar-bottom-stripe {
    transition: none;

    .sidecar-bottom-stripe-right-bits {
      /* filler in the window stripe to fill with the content column */
      flex: 1;
      justify-content: flex-end;
      background-color: var(--color-sidecar-header);
    }

    .kui--sidecar--titlebar-navigation {
      /* filler in the window stripe to fill with the sidenav column */
      background-color: var(--color-sidecar-header);
      margin: 0;
      border: none;
    }
  }

  /* tables in sidecar */
  .kui--data-table-wrapper {
    margin: 0;
    background-color: inherit;
  }
  .result-table-outer,
  .kui--data-table-wrapper,
  .bx--data-table {
    width: 100%;
  }
  .bx--data-table.result-table[kui-table-style] th.header-cell {
    color: var(--color-text-01);
  }
  .row-selection-context:not(.selected-row) .selected-entity svg path {
    /* radio buttons in tables */
    fill: var(--color-text-01) !important;
  }
  .result-table-title-outer {
    /* table titles */
    color: var(--color-base0C);
  }
}

.kui--sidecar {
  font-family: var(--font-sans-serif);
}

.kui--sidecar .bx--data-table {
  white-space: normal;
}

.kui--sidecar-header-and-body {
  .kui--sidecar-content {
    display: flex;
    flex: 1;
    background-color: var(--color-sidecar-background-01);
    color: var(--color-text-01);
    padding: 0;

    .bx--data-table-container {
      flex: 1;
      padding: 0;

      .bx--data-table {
        td span {
          word-break: break-word;
        }
      }
    }

    .hide-with-sidecar {
      display: none;
    }
  }
}

.kui--sidecar.visible.maximized {
  flex-basis: 100%;
}
